package orbito.scene;

import java.awt.Color;
import java.util.Random;

import orbito.entity.Planetoid;
import orbito.entity.PlanetoidFactory;
import orbito.entity.PlanetoidSystem;
import orbito.util.Vec2;

public class EllipticOrbitsScene extends PlanetoidSystemTemplateScene {
	protected PlanetoidSystem createSystem(Random rand) {
		Planetoid centroid = new Planetoid("The Sun", new Vec2(), new Vec2(), 1e30, 1e8, Color.ORANGE, null);
		PlanetoidSystem system = new PlanetoidSystem(centroid);
		
		Planetoid planet;
		
		planet = PlanetoidFactory.generateOrbitingPlanetoid("Daenerys Stormborn", 1e24, 1e6, Color.WHITE, centroid, 5e9, false, rand);
		planet.getVelocity().imul(0.5);
		system.addChildSystem(new PlanetoidSystem(planet));
		
		planet = PlanetoidFactory.generateOrbitingPlanetoid("Jorah the Andal", 8e24, 3e6, Color.RED, centroid, 2.5e9, false, rand);
		planet.getVelocity().imul(0.35);
		system.addChildSystem(new PlanetoidSystem(planet));
		
		planet = PlanetoidFactory.generateOrbitingPlanetoid("Robert Baratheon", 3e24, 1.5e6, Color.GREEN, centroid, 1.3e9, false, rand);
		planet.getVelocity().imul(0.5);
		system.addChildSystem(new PlanetoidSystem(planet));
		
		planet = PlanetoidFactory.generateOrbitingPlanetoid("Theon Grayjoy", 1e18, 1e5, Color.PINK, centroid, 3e10, false, rand);
		planet.getVelocity().imul(0.1);
		system.addChildSystem(new PlanetoidSystem(planet));
		
		return system;
	}
	
	public String getSceneName() {
		return "Elliptic Orbits";
	}
}
